/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package cn.dakaqi.activity.services;

import cn.dakaqi.entities.Activity;
import cn.dakaqi.utils.exception.ServiceRuntimeException;
import org.springframework.data.domain.Page;

import java.util.List;


public interface ActivityService
{
	List<Activity> save(String json)throws ServiceRuntimeException;
	List<Activity> save(Activity activity)throws ServiceRuntimeException;
	void update(String json)throws ServiceRuntimeException;
	void update(Activity activity)throws ServiceRuntimeException;
	void updateActivityInfo(Activity activity)throws ServiceRuntimeException;
	void delete(String param)throws ServiceRuntimeException;
	void delete(String memberCode,Long id)throws ServiceRuntimeException;
	void delete(String memberCode,String activityCode)throws ServiceRuntimeException;
	Activity findOne(Long id)throws ServiceRuntimeException;
	Activity findByActivityCode(String activityCode)throws ServiceRuntimeException;
	Activity findByActivityCode(String memberCode,String activityCode)throws ServiceRuntimeException;
	Page<Activity> findByName(String name,int pageNumber)throws ServiceRuntimeException;
	Page<Activity> findByCreateUser(Long volunteerId,int pageNumber)throws ServiceRuntimeException;
	Page<Activity> findByGroup(Long groupId, int pageNumber)throws ServiceRuntimeException;
	Page<Activity> findByGroupCode(String groupCode, int pageNumber)throws ServiceRuntimeException;
	Page<Activity> findTodayNotEnd(String today,int pageNumber)throws ServiceRuntimeException;
	Page<Activity> findNotEnd(int pageNumber)throws ServiceRuntimeException;
	Page<Activity> findEndAndUnLocked(int pageNumber)throws ServiceRuntimeException;
	List<Activity> findNameLike(String content)throws ServiceRuntimeException;
	List<Activity> findTagsLike(String tag)throws ServiceRuntimeException;
	List<Activity> findToday(String today,int status)throws ServiceRuntimeException;
	void locked()throws ServiceRuntimeException;
	void updateStatus()throws ServiceRuntimeException;
	void signInfo()throws ServiceRuntimeException;
	int countByStatus(int status)throws ServiceRuntimeException;
	int countByGroupAndStatus(long groupId,int status)throws ServiceRuntimeException;
	Page<Activity> searchActivity(String groupCode, String title, String startDate, String endDate, int pageNumber) throws ServiceRuntimeException;
	Activity activityManager(String activityCode)throws ServiceRuntimeException;
}
